import os
import pickle
import torch
from s import Summode
import seed
model = torch.load("save.pt")
i=0
c = 0
d = 0
e = 0
g = 0
#seed.seed_everything()
for index in range(401,604):
    if os.path.exists("D:/emotiondataset/"+str(index)):
        f=open("D:/emotiondataset/"+str(index),"rb")
        inputs = pickle.load(f)
        model.eval()
        out = model(inputs[0].cuda())
        a = int(torch.argmax(out))
        b = int(torch.argmax(inputs[1]))
        print(a,b)
        #print(a)
        if a == b:
            c = c+1
        if a == 0:
            d =d+1
        if a == 1:
            e = e+1
        if a ==2:
            g = g+1
        #print(torch.
        #input[0].cuda(),input[1])
        i = i + 1
print(c,i)
print(d,e,g)